package com.wanhe.mealbookmodule.presenter;

import com.wanhe.mealbookmodule.adapter.views.IListViewAdapter;

import java.util.List;

/**
 * 用于管理adapter的presenter
 * Created by 陈德基 on 2016/5/18.
 */
public abstract class BaseAdapterPresenter extends BasePresenter {

    /**
     * 加载更多数据到列表
     *
     * @param reference
     * @param list
     */
    protected void loadmord(IListViewAdapter reference, List list) {
        if (checkRefrence(reference)) {
            reference.loadMore(list);
        }
    }

    /**
     * 刷新列表
     *
     * @param reference
     * @param list
     */
    protected void refresh(IListViewAdapter reference, List list) {
        if (checkRefrence(reference)) {
            reference.refresh(list);
        }
    }

}
